package com.binance.mbxgateway.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.mbxgateway.vo.request.InternalPingStreamRequest;
import com.binance.mbxgateway.vo.request.PingStreamRequest;
import com.binance.mbxgateway.vo.request.StartStreamRequest;
import com.binance.mbxgateway.vo.response.PingSteamResponse;
import com.binance.mbxgateway.vo.response.StartStreamResponse;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api
@FeignClient(name = Constant.MBX_GATEWAY_SERVICE, configuration = FeignConfig.class)
public interface IUserStreamApi {

    @ApiOperation("userStream：输入userId")
    @PostMapping(value = "/mgmt/startStream")
    APIResponse<StartStreamResponse> internalStartStream(@RequestBody APIRequest<StartStreamRequest> request)
            throws Exception;

    @ApiOperation("userStream：输入userId")
    @PostMapping(value = "/private/startStream")
    APIResponse<StartStreamResponse> startStream(@RequestBody APIRequest<StartStreamRequest> request) throws Exception;

    @ApiOperation("pingStream：输入userId")
    @PostMapping(value = "/mgmt/pingStream")
    APIResponse<Void> internalPingStream(@RequestBody APIRequest<InternalPingStreamRequest> request) throws Exception;

    @ApiOperation("pingStream：输入userId")
    @PostMapping(value = "/private/pingStream")
    APIResponse<PingSteamResponse> pingStream(@RequestBody APIRequest<PingStreamRequest> request) throws Exception;
}
